#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main()
{
    int n;
    string s;
    cin >> n;
    cin.get();
    getline(cin, s);
    int col = s.size() / double(n);
    if (s.size() % n != 0)
        col++;
    vector<string>res(col);
    for (int i = 0; i < col; i++)
    {
        if (i == col - 1)
            res[i] = string(s.begin() + i * n, s.end());
        else
            res[i] = string(s.begin() + i * n, s.begin() + (i + 1) * n);
    }
    res[col - 1].resize(n, ' ');
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < col; j++)
        {
            cout << res[col - j - 1][i];
        }
        cout << endl;
    }
}